package com;

import java.util.ArrayList;
import java.util.Scanner;

public class menu {
    public static void menu()
    {
        Scanner sc = new Scanner(System.in);
        ArrayList<student> st = new ArrayList<>();
        loop:while(true){
            System.out.println("-----------欢迎来到学生管理系统------------------");
            System.out.println("1.添加学生");
            System.out.println("2.删除学生");
            System.out.println("3.修改学生");
            System.out.println("4.查询学生");
            System.out.println("5.退出");
            System.out.println("请输入您的选择");
            int i = sc.nextInt();
            switch (i)
            {
                case 1:
                    add.add(st);
                    break;
                case 2:
                    delete.delete(st);
                    break;
                case 3:
                    modify.modify(st);
                    break;
                case 4:
                    select.select(st);
                    break;
                case 5:
//                    break loop;
                    System.exit(0);//停止虚拟机运行
                default:
                    System.out.println("输入不合法,请重新输入");
            }

        }
    }
}
